package DongTaiDaiLi;

import jingtaidaili.Father;
import jingtaidaili.Person;
import jingtaidaili.Son;
import sun.misc.ProxyGenerator;

import java.io.FileOutputStream;

/**
 * @program: homeWork
 * @description:
 * @author: hezhiqin
 * @create: 2019-09-27 08:21
 */
public class Test {

    public static void main(String[] args) {
        Person obj = null;
        try {
            obj = (Person)new JDKMeipo().getInstance(new Customer());
            byte [] bytes = ProxyGenerator.generateProxyClass("$Proxy0",new Class[]{Person.class});
            FileOutputStream os = new FileOutputStream("D://$Proxy0.class");
            os.write(bytes);
            os.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
        obj.findLove();
    }
}
